import request from '@/router/axios';

//我的任务列表
export const getMyTaskList = (params) => {
  return request({
    url: '/api/hg-public/apqpdesign/getMyTask',
    method: 'get',
    params: {
      ...params,
    }
  })
}
// 获取用户id
export const getPersonId = (id) => {
  return request({
    url: '/api/blade-user/info',
    method: 'get',
    params: {
      id,
    }
  })
}
//获取项目阶段下拉选
export const getStageList = (params) => {
  return request({
    url: '/api/hg-public/apqpdesign/getTaskPhases',
    method: 'get',
    params: {
      ...params,
    }
  })
}

//新增
export const addTask = (row) => {
  return request({
    url: '/api/hg-public/apqpdesign/save',
    method: 'post',
    data: row
  })
}

//删除 
export const removeTask = (ids) => {
  return request({
    url: '/api/hg-public/apqpdesign/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

//更新 
export const updateTask = (row) => {
  return request({
    url: '/api/hg-public/apqpdesign/update',
    method: 'post',
    data: row
  })
}

//获取 详情
export const getTask = (id) => {
  return request({
    url: '/api/hg-public/apqpdesign/detail',
    method: 'get',
    params: {
      id,
    }
  })
}

//获取部门
export const getDept = () => {
  return request({
    url: '/api/hg-public/personinfo/deptlist',
    method: 'get',
    params: {
    }
  })
}

//获取 计划 详情
export const getPlan = (id) => {
  return request({
    url: '/api/hg-public/planexecute/list',
    method: 'get',
    params: {
      id,
    }
  })
}